async function updateText() {
    var myChart = document.getElementById('echart01');
    const chartInstance = myChart.getChartInstance();
    const dataUrl = "/shujuzhanshi/execute_sql_api_ad";
    const params = new URLSearchParams({
        conninfo: '{"host":"localhost","port":8047}',
        sql: "select name,shuliang from mysql.test.sale order by id"
    });

    const fullUrl = `${dataUrl}?${params}`;

    try {
        const response = await fetch(fullUrl);
        if (!response.ok) {
            throw new Error(`HTTP error! Status: ${response.status}`);
        }
        const data = await response.json();
        if (data){
            chartInstance.setOption({
                xAxis: {
                    data:data.data
                },
                series: [{
                    data:data.ydata
                }]
            });
        }
    } catch (error) {
        console.log(`错误: ${error.message}`);
    }
}